/*
 * Copyright (c) 2024-2025 LTC-CN. All rights reserved.
 * <p>
 * This file is part of the ltc-cn-springboot project.
 * <p>
 * ltc-cn-springboot is distributed under the terms of the MIT License.
 * For details, see the accompanying LICENSE file or visit:
 * <a href="https://www.ltc-cn.top/projects">...</a>
 */

package top.ltc_cn.springboot_tools.tools;

/**
 * @author ltc-cn xiaoyangcc
 */
public class LtcUtils {

    private LtcUtils() {} // 防止实例化

    // 辅助方法：检查所有参数是否为null
    public static boolean allNull(String... args) {
        for (String arg : args) {
            if (arg != null && !arg.trim().isEmpty()) {
                return false;
            }
        }
        return true;
    }

    // 辅助方法：检查所有参数是否为null
    public static void allNull(boolean throwException, String... args) {
        for (String arg : args) {
            if (arg != null && !arg.trim().isEmpty()) {
                throw new IllegalArgumentException("参数不能为空");
            }
        }
    }

}
